package project.euler;

public class SingleLinkedList {
	
	public int size;
	private Node node;
	
	public SingleLinkedList() {
		size = 0;
		node = new Node(null, null);
	}
	
	public void addElementAfter(Object element){
		node.addElementAfter(element);
		size++;
	}
	
	private static class Node{
		private Node next;
		private Object e;
		
		public Node(Object e, Node next) {
			this.e = e;
			this.next = next;
		}
		
		public void addElementAfter(Object e){
			next = new Node(e,next);
		}
	}
	

	
}

class ListTest{
	public static void main(String[] args) {
		SingleLinkedList l1 = new SingleLinkedList();
		l1.addElementAfter("shekhar");
		l1.addElementAfter("supriya");
		System.out.println(l1.size);
		
	}
}
